const common = require('./webpack.common')
const WebpackMerge = require('webpack-merge')
const webpack = require('webpack')

module.exports = WebpackMerge.merge(common, {
  mode: 'development',
  devtool: 'cheap-eval-module-source-map',
  plugins: [new webpack.HotModuleReplacementPlugin()],
  devServer: {
    contentBase: './public',
    // proxy: {
    //   '/api': {
    //     target: 'https://api.github.com',
    //     pathRewrite: {
    //       '^/api': '',
    //     },
    //     changeOrigin: true,
    //   },
    // },
    hotOnly: true,
  },
})
